# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test01
# Description:
# Author:       98745
# Date:         2019/4/17
#-------------------------------------------------------------------------------

from xml.etree.ElementTree import parse


doc=parse('../samlples/files/products.xml')

d=doc.iterfind('products/person')
for item in d:
    print('id=',item.findtext('id'))
    print('name=',item.findtext('name'))




